<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>upload</title>
</head>
<body>
    <a id="pick" href="#" >+++</a>
    <div style="height: 100px; background-color: orange"></div>
    <script src=" https://code.jquery.com/jquery-3.2.1.js"></script>
    <script  src="qiniuNew.js"></script>
    <script type="text/javascript" src="mainNew.js"></script>
    <script type="text/javascript"> 

    //假数据---------------------------------------------------
    var opt = {
                bucket: 1, //存储空间 私有空间=1；公有空间=2；
                category: 5, //新闻=1；比赛直播=2；篮球圈=3；用户资料=4；百科=5；
                key: "wiki-bb0e6374-9e1b-422d-82ae-2cc9e848827b.png", //文件名，若不为空 则覆盖上传。为空则上传新文件
                apiHost: "http://192.168.2.10:8102",
                maxSize: 300,
                onUploaded: function(data) {

                },
                onUploadStart: function() {

                },
                onUploadProgress: function(data) {
                    console.log(data)
                }
            }


            localStorage.setItem('xmzy_user_token', '42bf7d9b15ce415d971510a73a7e143a');

    //--------------------------------------------------------------------------------------------

    var uploader = new QiniuUploaderNew('#pick', opt)
    console.log(uploader)
</script>
</body>
</html>